#include "ParserObject.h"

ParserObject::ParserObject() : type(PARSER_OBJECT_TYPE_GENERIC_ERROR) { }

ParserObject::ParserObject(int type) : type(type) { }

ParserObject::ParserObject(int type, std::vector<std::string> values) : type(type), values(values) { }

std::string &ParserObject::operator[](unsigned int index) {
	if (index >= values.size()) {
		throw ExceptionMaxParsedValueExceeded();
	}
	return this->values[index];
}

int ParserObject::getType() {
	return this->type;
}

unsigned int ParserObject::size() {
	return this->values.size();
}